package org.grayrabbit.cms.plugin;
import java.util.ArrayList;
import java.util.List;

import org.grayrabbit.cms.plugin.loaders.ClassPathPluginLoader;
import org.grayrabbit.cms.plugin.loaders.PluginLoader;


/**
 * @author sys53
 * @version 1.0
 * @created 06-一月-2012 16:14:29
 */
public class DefaultPluginLoaderFactory implements PluginLoaderFactory {
	private final PluginLoader installedPluginsLoader;
	public DefaultPluginLoaderFactory(PluginInstallationManager installablePluginManager)
	  {
	    this.installedPluginsLoader = installablePluginManager.getInstalledPluginsLoader();
	  }

	public List<PluginLoader> getPluginLoaders(){
		List<PluginLoader> list = new ArrayList<PluginLoader>();
		list.add(new ClassPathPluginLoader());
		list.add(this.installedPluginsLoader);
		return list;
	}

}